Movement


In any game, movement and position are of paramount importance and so GameMaker Studio 2 has a complete selection of functions to deal with every situation. The two main ways of moving an instance is to either set the actual position or to set a speed/direction vector, and this can be done either using the built in variables instance variables or to use specific movement functions. Both of these options are explained in the sections listed below:

The following variables are all included "built in" to every instance and can be read and modified to change different behaviours when the instance is moving (they will affect the speed and direction vectors):

Other than those variables mentioned above you can also set the instance position directly using the following:


The following functions can all be used to move an instance in some way, with some affecting the speed/direction vectors and others affecting the actual x/y position within the room directly: